package com.xb.system.exception;

import com.xb.common.result.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
public class XBException extends RuntimeException{

        private Integer code;

        private String message;

        private ResultCodeEnum resultCodeEnum;

        public XBException(Integer code, String message) {
                super(message);
                this.code = code;
        }

        public XBException(ResultCodeEnum resultCodeEnum) {
                this.resultCodeEnum = resultCodeEnum;
        }
}
